package com.mxpio.erp.common.quality.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * @Author : wpp
 * @Datetime : 2023/6/6 14:32
 * @Desc :
 * @Modor :  Modifytime:
 * @modDesc : 质检单据
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_QUALITY_IB_SIMPLE")
@Schema(description="质检单据-样本")
public class InspectionBillSimple extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Id
    @Generator(policy = UUIDPolicy.class)
    @Column(name = "ID_", length = 64)
    @Schema(description = "ID主键")
    private String id;

    @Column(name = "BIZ_NO_", updatable = false)
    @Schema(description = "质检单据编码")
    private String bizNo;

    @Column(name = "SIMPLE_CODE_", updatable = false)
    @Schema(description = "样本编号")
    private String simpleCode;

    @Column(name = "SORT_")
    @Schema(description = "顺序号")
    private Integer sort;

    @Column(name = "TEST_RESULT_")
    @Schema(description = " 样本检验结论")
    @Dict(dicCode = "MB_QUALITY_CHECK_RESULT")//0不合格，1合格
    private String testResult;

    @Column(name = "DETECT_QUANTITY_")
    @Schema(description = "检测项数量")//检测项数量
    private BigDecimal detectQuantity;

    @Transient
    @Schema(description = "已检验的检测项数量")//已检验的检测项数量
    private Integer checkDetectNum;

    @Column(name = "MEMO_")
    @Schema(description = "备注")
    private String memo;

}
